Skip to content
This repository was archived by the owner on Apr 23, 2026. It is now read-only.

B-26364 adjust for comments#20

Merged
r-mettler merged 1 commit into
mainfrom
B-26364-viewer-fit
Apr 14, 2026
Merged

B-26364 adjust for comments#20
r-mettler merged 1 commit into
mainfrom
B-26364-viewer-fit

Conversation

@antgmann
Copy link
Copy Markdown

B-26364

Important

This MR addresses comments received, will necessitate version 1.5.1

These changes provide some rather significant adjustments to how we display images, as well as how pdfs appear visually. Because of this, a new minor version (1.5.0) may be appropriate. Amongst the improvements:

  • PDFs and Images both now find a 'best fit zoom' by being equal to or slightly less than the width of the container
  • PDFs and Images both now have increased zoom steps
  • Images will now re-render upon transformation like PDFs do (helps to prevent them from 'spilling over' beyond scrollable overflow)
  • Zoom steps are now mapped
  • PDFs minor offsets, overflow, and scrolling improvements
  • Significant transformation-responsive offset, padding, styling improvements for images

Testing Instructions
These changes are made based upon Alex's changes for 26359, hence the dependency. In order to best test these changes, please check out the B-26364 branch in our repository before testing.
Also, if you want to see a before and after rather than just the after, do step 3 first.

  1. Update your local to use "@transcom/react-file-viewer": "git+https://github.com/transcom/react-file-viewer#B-26364-viewer-fit", in package.json
  2. Clear and reinstall your npm modules with rm -rf node_modules then yarn install, we don't want a frozen lockfile (rm -rf node_modules && yarn install && ./scripts/copy-react-file-viewer && make client_run)
  3. Anywhere in the app upload a handful of images and PDFs that you'll be able to review in the document viewer like orders and navigate to viewing them. Best if also done for PPM docs, payment requests, etc.
  4. Verify the center component where the image is displayed fills the space available to it, the vertical scrollbar is flush against the right sidebar, and the horizontal scrollbar is not hidden by the the controls bar at the bottom.
  5. Verify that documents load at a reasonable zoom level, are visible, and transform well when rotated and zoomed.

@antgmann antgmann requested review from a team, ajlusk and r-mettler April 14, 2026 15:11
@antgmann antgmann self-assigned this Apr 14, 2026
@antgmann antgmann changed the title adjust for comments B-26364 adjust for comments Apr 14, 2026
Copy link
Copy Markdown

@ajlusk ajlusk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updates work well for me

@r-mettler r-mettler merged commit 1483771 into main Apr 14, 2026
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants